<?php 
    /**
    * 搜索页面
    *
    * @package custom
    */
$this->need('header.php');?>
<div id="main">
	<div id="postlist">
		<div id="cse" style="width: 100%;"><p style="padding:2%;">正在从Google 加载搜索结果......</p></div>
		<script src="http://www.google.com/jsapi" type="text/javascript"></script>
		<script type="text/javascript">
			google.load('search', '1', {language : 'zh-CN'});
			google.setOnLoadCallback(function(){
				var customSearchControl = new google.search.CustomSearchControl('006752041338783184686:_s9l4o3o-9u');
				customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
				customSearchControl.draw('cse');
				var match = location.search.match(/g=([^&]*)(&|$)/);
				if(match && match[1]){
					var search = decodeURIComponent(match[1]);
					customSearchControl.execute(search);
				}
			});
		</script>
		<link rel="stylesheet" href="http://www.google.com/cse/style/look/greensky.css" type="text/css" />
		<style type="text/css">.cse .gsc-control-cse, .gsc-control-cse{padding:0}.cse .gsc-control-cse, .gsc-control-cse{background-color:#FFF;border:0 none;}.cse input.gsc-input, input.gsc-input{color:#000;border-color: #eee;}.cse input.gsc-search-button, input.gsc-search-button{border-color: #eee;background-color: #eee;}</style>
	</div>
</div>
<?php $this->need('sidebar.php'); ?>
<?php $this->need('footer.php'); ?>